package com.atguigu.educms.controller;


import com.aiguigu.commonutils.R;
import com.atguigu.educms.entity.CrmBanner;
import com.atguigu.educms.service.CrmBannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author Y丶HS练习谷粒商城
 * @since 2022-10-01
 */
@Api("轮播前台展示")
@RestController("crmBannerController")
@RequestMapping("/educms/crmBanner")
public class CrmBannerController {

    @Resource
    private CrmBannerService bannerService;

    @ApiOperation("页面展示")
    @GetMapping("/getAllInfo")
    public R getAllInfo() {
        List<CrmBanner> bannerList = bannerService.selectAllInfo();
        return R.ok().data(bannerList);
    }
}

